<p:panelGrid xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" xmlns:t="http://myfaces.apache.org/tomahawk" columns="2"
	columnClasses="width30,width70" style="width:100%">
	<h:outputLabel value="#{msgs.evok_patient_createDate} *" />
	<p:calendar value="#{evokPatientProfileBean.patient.createDate}" navigator="true"
		label="#{msgs.evok_patient_createDate}" pattern="dd/MM/yyyy" showOn="button"
		style="validator:checkNotNull(#{msgs.evok_patient_createDate})" />
	
	<h:outputLabel value="#{msgs.empl_surname} *" />
	<p:inputText value="#{evokPatientProfileBean.patient.surname}" label="#{msgs.empl_surname}"
		style="width:90%;validator:checkNotNull(#{msgs.empl_surname})" maxlength="45">
	</p:inputText>

	<h:outputLabel value="#{msgs.empl_name} *" />
	<p:inputText value="#{evokPatientProfileBean.patient.name}" label="#{msgs.empl_name}"
		style="width:90%;validator:checkNotNull(#{msgs.empl_name})" maxlength="45">
	</p:inputText>

	<h:outputLabel value="#{msgs.empl_birthday} *" />
	<p:calendar value="#{evokPatientProfileBean.patient.birthday}" navigator="true" pattern="dd/MM/yyyy"
		style="validator:checkNotNull(#{msgs.empl_birthday})" label="#{msgs.empl_birthday}" showOn="button"/>

	<h:outputLabel value="#{msgs.empl_birthplace} *" />
	<h:panelGrid columns="3" styleClass="tableNoBorder" width="100%">
		<p:selectOneMenu id="region" value="#{evokPatientProfileBean.birthRegionId}" 
			converter="longConverter" >
			<f:selectItem itemLabel="" itemValue="" />
			<f:selectItems value="#{cityBean.regionList}" var="re" itemLabel="#{re.name}"
				itemValue="#{re.id}" />
			<p:ajax update="city,postcode" listener="#{evokPatientProfileBean.birthRegionChange}" />
		</p:selectOneMenu>

		<p:selectOneMenu id="city" value="#{evokPatientProfileBean.birthCityId}" converter="longConverter"
			style="validator:checkNotNull(#{msgs.empl_birthplace})" label="#{msgs.empl_birthplace}">
			<f:selectItem itemLabel="" itemValue="" />
			<f:selectItems value="#{evokPatientProfileBean.birthCityList}" var="ct" itemLabel="#{ct.name}"
				itemValue="#{ct.id}" />
			<p:ajax update="postcode" listener="#{evokPatientProfileBean.birthCityChange}" />
		</p:selectOneMenu>

		<h:outputText value="#{evokPatientProfileBean.birthPostcode}" id="postcode" />
	</h:panelGrid>

	<h:outputLabel value="#{msgs.empl_street} *" />
	<p:inputText value="#{evokPatientProfileBean.patient.street}"
		style="width:90%;validator:checkNotNull(#{msgs.empl_street})" maxlength="80" />

	<h:outputLabel value="#{msgs.empl_liveplace} *" />
	<h:panelGrid columns="3" styleClass="tableNoBorder" width="100%">
		<p:selectOneMenu id="region1" value="#{evokPatientProfileBean.liveRegionId}" converter="longConverter">
			<f:selectItem itemLabel="" itemValue="" />
			<f:selectItems value="#{cityBean.regionList}" var="re" itemLabel="#{re.name}"
				itemValue="#{re.id}" />
			<p:ajax update="city1,postcode1" listener="#{evokPatientProfileBean.liveRegionChange}" />
		</p:selectOneMenu>
		<p:selectOneMenu id="city1" value="#{evokPatientProfileBean.liveCityId}" converter="longConverter"
			label="#{msgs.default_city}">
			<f:selectItem itemLabel="" itemValue="" />
			<f:selectItems value="#{evokPatientProfileBean.liveCityList}" var="ct" itemLabel="#{ct.name}"
				itemValue="#{ct.id}" />
			<p:ajax update="postcode1" listener="#{evokPatientProfileBean.liveCityChange}" />
		</p:selectOneMenu>
		<h:outputText value="#{evokPatientProfileBean.livePostcode}" id="postcode1" />
	</h:panelGrid>

	<h:outputLabel value="#{msgs.evok_patient_code}" />
	<p:inputText value="#{evokPatientProfileBean.patient.code}" style="width:90%;" maxlength="40"/>

	<h:outputLabel value="#{msgs.empl_sex}" />
	<p:selectOneMenu value="#{evokPatientProfileBean.patient.sex}">
		<f:selectItem itemLabel="" itemValue="" />
		<f:selectItems value="#{sessionEnum['Sex']}" var="re" itemLabel="#{re.name}"
			itemValue="#{re.value}" />
	</p:selectOneMenu>

	<h:outputLabel value="#{msgs.empl_oib}" />
	<p:inputText value="#{evokPatientProfileBean.patient.oib}" style="width:90%;" maxlength="11" />

	<h:outputLabel value="#{msgs.empl_jmbg}" />
	<p:inputText value="#{evokPatientProfileBean.patient.jmbg}" style="width:90%;" maxlength="13" />

	<h:outputLabel value="#{msgs.empl_remark}" />
	<p:inputTextarea value="#{evokPatientProfileBean.patient.remark}" rows="4" style="width:90%"
		maxlength="250" />
</p:panelGrid>